Add native dependencies to doctest
authorMathijs van de Nes <git@mathijs.vd-nes.nl>
Thu, 16 Apr 2015 15:00:39 +0000 (17:00 +0200)
committerMathijs van de Nes <git@mathijs.vd-nes.nl>
Thu, 16 Apr 2015 15:00:39 +0000 (17:00 +0200)
This will traverse all native dependencies and add them to the rustdoc
command when running tests.

Fixes #1245

src/cargo/ops/cargo_test.rs

index ccc872e39426628e5df7a583a8edc7c03ec3252c..b4132239fcc55c707eaf0796a8e099f63c17cb10 100644 (file)
@@ -45,6 +45,10 @@ pub fn run_tests(manifest_path: &Path,
          })
          .cwd(compile.package.root());
 
+        for native_dep in compile.native_dirs.values() {
+            p.arg("-L").arg(native_dep);
+        }
+
         if test_args.len() > 0 {
             p.arg("--test-args").arg(&test_args.connect(" "));
         }